/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wf.plccom;

/**
 *
 * @author student
 */
public class Word {
    char[] data;

    public Word(char a, char b, char c, char d) {
        this.data = new char[]{a, b, c, d};
    }

    @Override
    public String toString() {
        return new String(data);
    }

    public char[] getHexParts() {
        return data;
    }

    public void setHexPart(int part, char v){
        data[part] = v;
    }

    public int toInteger(){
        return Integer.parseInt(toString() ,16);
    }
}
